package com.ray.aopdemo.web;

import com.ray.aopdemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * User: Ray.Shaw <p />
 * Time: 2019/11/1 15:38  <p />
 * Version: V1.0  <p />
 * Description:  <p />
 */

@RestController
@RequestMapping("/aop")
public class AOPController {
    @Autowired
    private UserService userService;

    @RequestMapping(value = "/sayHello",method = RequestMethod.GET)
    public String sayHello(String name){
        return "hello " + name;
    }

    @RequestMapping(value = "/talktome",method = RequestMethod.GET)
    public String talktome(){
        return userService.talktoMe();
    }

}
